Skip to content

Sidebar items have inconsistent padding depending on whether they're links #12967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
dipikabh opened this issue Apr 25, 2025 · 0 comments
Open
3 tasks done
Labels
idle layout Issues related to alignment, positioning and spacing/margin/padding p2 We want to address this but may have other higher priority items.

Comments

@dipikabh
Copy link
Contributor

dipikabh commented Apr 25, 2025

Summary

The sidebar in the HTML reference page shows inconsistent left padding between linked (<a>) items and non-linked elements.

URL

https://developer.mozilla.org/en-US/docs/Web/HTML

Reproduction steps

  1. Visit https://developer.mozilla.org/en-US/docs/Web/HTML.
  2. Check "Reference" section in the sidebar.
  3. Compare the padding of these items:
    • "Elements", "Attributes", "Global attributes" → have more padding (these are links).
    • "Attributes by element", "Attributes by value" → no padding (not links).

Expected behavior

Same or no padding, regardless of whether they are links or not

Actual behavior

Items with <a> in the sidebar have padding: .25rem;.

Device

Laptop

Browser

Firefox

Browser version

Stable

Operating system

Mac OS

Screenshot

sidebar-bug-link-padding

Anything else?

From https://github.com/mdn/content/blob/main/files/sidebars/htmlsidebar.yaml:

  • This entry has a link defined, so has the padding:
- type: listSubPages
  path: /Web/HTML/Reference/Elements
  link: /Web/HTML/Reference/Elements
  title: HTML_Elements
  details: closed
  code: true
  • This entry does not have a link, so doesn't have a padding:
  - title: Attribute_values
    details: closed
    children:
      - type: listSubPages
        path: /Web/HTML/Reference/Attributes/rel
        title: Rel_keywords
        details: closed
        code: true

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 25, 2025
@caugner caugner added p2 We want to address this but may have other higher priority items. layout Issues related to alignment, positioning and spacing/margin/padding and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Apr 29, 2025
@github-actions github-actions bot added the idle label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle layout Issues related to alignment, positioning and spacing/margin/padding p2 We want to address this but may have other higher priority items.
Projects
None yet
Development

No branches or pull requests

2 participants